<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>荣耀MagicBook X 16 Pro 锐龙版 2023</title>
</head>

<body>
    <!--
        https://www.hihonor.com/cn/laptops/honor-magicbook-x-16-pro-2023-amd/
    -->
    <div class="content">
        <div class="box">
            <div class="box-child one">1</div>
            <div class="box-child two">2</div>
            <div class="box-child three">3</div>
            <div class="box-child four">4</div>
            <div class="box-child five">5</div>
            <div class="box-child sex">6</div>
            <div class="box-child seven ">7</div>
            <div class="box-child eight ">8</div>
        </div>
    </div>
    <style>
        :root {
            --tile-gap: 15px;
        }

        .content {
            margin-left: auto;
            margin-right: auto;
            width: 980px;
        }

        .box {
            --column-count: 6;
            width: 100%;
            display: grid;
            grid-gap: var(--tile-gap);
            gap: var(--tile-gap);
            grid-template-columns: repeat(var(--column-count), 1fr);
            /*横*/
            grid-template-rows: 1fr 1fr 1fr 1.5fr;
            /*竖*/
        }

        .box>.box-child {
            background-color: #f5f5f7;
            border-radius: 18px;
            display: flex;
            overflow: hidden;
            min-height: 150px;
            /*两端居中*/
            justify-content: center;
            /*垂直居中,仅包含子元素*/
            align-items: center;
            font-size: 28px;
            font-weight: bold;

        }

        /*奇数*/
        .box :nth-child(odd) {
            background-color: tomato;
        }

        /*偶数*/
        .box :nth-child(even) {
            background-color: teal;
        }

        .one {
            grid-row-end: span 2;
            grid-column: span 3;
        }

        .two,
        .three {
            grid-column: span 3;
        }

        .four,.five {
            grid-column: span 3;
        }

        

        .sex,
        .seven,
        .eight {
            grid-column: span 2;
        }
    </style>
</body>

</html>